package br.edu.ifrn.tads.pontos.o;

import org.apache.http.client.CookieStore;
import org.apache.http.client.protocol.ClientContext;
import org.apache.http.impl.client.BasicCookieStore;
import org.apache.http.protocol.BasicHttpContext;
import org.apache.http.protocol.HttpContext;

import android.app.Application;

public class Globals extends Application {
	private static CookieStore cookieStore;
	public static final String SERVER_URL = "http://pontos.sedir.me";
	private static HttpContext httpContext;
	
	@Override
	public void onCreate() {
		super.onCreate();
	}
	
	public static HttpContext getGlobalHttpContextInstance(){
		if (httpContext==null){
			cookieStore = new BasicCookieStore();
			httpContext = new BasicHttpContext();
			httpContext.setAttribute(ClientContext.COOKIE_STORE, cookieStore);		
		}
		
		return httpContext;
	}
	
}
